package com.yxb.evaluation.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yxb.evaluation.mapper.EvaluationMapper;
import com.yxb.evaluation.domain.Evaluation;
import com.yxb.evaluation.service.IEvaluationService;

/**
 * 双向评价记录Service业务层处理
 * 
 * @author 林德炫
 * @date 2025-03-04
 */
@Service
public class EvaluationServiceImpl implements IEvaluationService 
{
    @Autowired
    private EvaluationMapper evaluationMapper;

    /**
     * 查询双向评价记录
     * 
     * @param evalId 双向评价记录主键
     * @return 双向评价记录
     */
    @Override
    public Evaluation selectEvaluationByEvalId(Long evalId)
    {
        return evaluationMapper.selectEvaluationByEvalId(evalId);
    }

    /**
     * 查询双向评价记录列表
     * 
     * @param evaluation 双向评价记录
     * @return 双向评价记录
     */
    @Override
    public List<Evaluation> selectEvaluationList(Evaluation evaluation)
    {
        return evaluationMapper.selectEvaluationList(evaluation);
    }

    /**
     * 新增双向评价记录
     * 
     * @param evaluation 双向评价记录
     * @return 结果
     */
    @Override
    public int insertEvaluation(Evaluation evaluation)
    {
        return evaluationMapper.insertEvaluation(evaluation);
    }

    /**
     * 修改双向评价记录
     * 
     * @param evaluation 双向评价记录
     * @return 结果
     */
    @Override
    public int updateEvaluation(Evaluation evaluation)
    {
        return evaluationMapper.updateEvaluation(evaluation);
    }

    /**
     * 批量删除双向评价记录
     * 
     * @param evalIds 需要删除的双向评价记录主键
     * @return 结果
     */
    @Override
    public int deleteEvaluationByEvalIds(Long[] evalIds)
    {
        return evaluationMapper.deleteEvaluationByEvalIds(evalIds);
    }

    /**
     * 删除双向评价记录信息
     * 
     * @param evalId 双向评价记录主键
     * @return 结果
     */
    @Override
    public int deleteEvaluationByEvalId(Long evalId)
    {
        return evaluationMapper.deleteEvaluationByEvalId(evalId);
    }
}
